#!/usr/bin/python3.4

# 'ab' is short for addressbook
ab = {
	'Jake'		: 'jake@mail.com',
	'Lily'		: 'lily@mail.com',
	'Peter'		: 'peter@mail.com',
	'Tom'		: 'Tom@gamil.com',
        'Lily'          : 'Lily2@mail.com'
}
print('Lily\'s email is %s' % ab['Lily'])


# Adding a key/value pair
ab['Larry'] = 'larry@163.com'

# Deleting a key/value pair
del ab['Tom']

print("There are %d contacts in the address-book\n" % len(ab))

for name, address in ab.items():
    print("Contact %s at %s" % (name, address))

if 'Larry' in ab: # Or ab.has_key('Larry')
    print("Larry\'s address is %s" % ab['Larry'])
